<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * 首页控制器
 * 
 * Enter description here ...
 * @author Administrator
 *
 */
class MY_Front_Controller extends CI_Controller 
{
    
    public function __construct()
    {
        parent::__construct();
        
        //对于所有前端，需要检查自动登陆
        $auto_login = $this->input->cookie('autologin', TRUE);
        $username = $this->input->cookie('username', TRUE);
        $password = $this->input->cookie('password', TRUE);
        
        //自动登陆
        if ($auto_login == 1 && $username && $password && !isset($_SESSION['islogin'])) {
            $this->memberlib->set_auto_login($username, $password);
        }
        
        
        //
        if (!isset($_SESSION['islogin']) || $_SESSION['islogin'] ==0 ) {
            MemberLib::set_session_for_name();
        } 
        
    }
    
    
    
	
}

